<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业1</title>
</head>
<body>
<script>

    var sum = 0;
    for (let i = 1; i < 101; i++) {
        if (i % 2 != 0) {
            sum += i;
        }
    }
    console.log("0-100奇数和：" + sum)
    var sum1 = 0;
    for (let i = 1; i < 101; i++) {
        if (i % 2 == 0) {
            sum1 += i;
        }
    }
    console.log("0-100偶数和：" + sum1);
</script>
</body>
</html>